<template>
    <div>
        <button @click="sendAjax">发送Ajax请求</button>
        <button @click="getWeather">获取天气数据</button>
    </div>
</template>

<script>
export default {
    data(){
        return {
            
        }
    },
    methods: {
        async sendAjax(){
            const res = await this.request.get('/users/list')
            console.log(res)
        },
        async getWeather(){
            const res = await this.request.get('/simpleWeather/query',{
                params: {
                    city: '南京',
                    key: '3b152d4c5b0b5ae07dce187e2ce9a04a'
                }
            })
            console.log(res)
        }
    }
}
</script>

<style lang="less" scoped>
    
</style>